package cn.iocoder.yudao.module.alipay.controller.app.infoorganize;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.module.alipay.controller.admin.infoorganize.vo.*;
import cn.iocoder.yudao.module.alipay.convert.infoorganize.InfoOrganizeConvert;
import cn.iocoder.yudao.module.alipay.dal.dataobject.infoorganize.InfoOrganizeDO;
import cn.iocoder.yudao.module.alipay.service.infoorganize.InfoOrganizeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.Collection;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;

@Tag(name = "小程序app - 机构详情")
@RestController
@RequestMapping("/alipay/info-organize")
@Validated
public class InfoOrganizeAppController {

    @Resource
    private InfoOrganizeService infoOrganizeService;


    @GetMapping("/getByTenantId")
    @Operation(summary = "获得机构详情")
    public CommonResult<InfoOrganizeRespVO> getByTenantId(@RequestParam("tenantId") Long tenantId) {
        InfoOrganizeDO infoOrganize = infoOrganizeService.getByTenantId(tenantId);
        return success(InfoOrganizeConvert.INSTANCE.convert(infoOrganize));
    }



}
